<template>
    <div>
        <VanNavBar
            title="新增地址"
            left-text=""
            left-arrow
            @click-left="onClickLeft"
            />

        <VanAddressEdit
            :area-list="areaList"
            show-delete
            show-set-default
            show-search-result
            :search-result="searchResult"
            :area-columns-placeholder="['请选择', '请选择', '请选择']"
            @save="onSave"
            @delete="onDelete"
            @change-detail="onChangeDetail"
            />

    </div>
</template>

<script setup lang="ts">
    import { ref } from 'vue';
    import { showToast } from 'vant';
    import { areaList } from '@vant/area-data';
   


    

    const searchResult = ref([]);
    const onClickLeft = () => history.back();

    const onSave = () => { };

    const onDelete = () => showToast('delete');

    const onChangeDetail = (val: any) => {
      if (val) {
        searchResult.value = [
          
        ];
      } else {
        searchResult.value = [];
      }
    };
  

</script>

<style scoped>

</style>
  